home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Grafik & Text / OzTeX3.0 / BibTeX / BibTeX inputs / plainnat.bst < prev    next >
Text File  |  1996-08-20  |  25KB  |  1,326 lines

  1. %% 
  2. %% This is file `plainnat.bst', generated 
  3. %% on <1995/12/7> with the docstrip utility (2.2i).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% natbst.mbs  (with options: `sorted,name-full,atit-lower,month-full,jour-full')
  8. %% ---------------------------------------- 
  9. %% *** Version of `plain.bst' for use with natbib package *** 
  10. %% 
  11.  % The original source file contains the following version information:
  12.  % \ProvidesFile{natbst.mbs}[1995/09/05 1.0 (PWD)]
  13.  
  14.  %% BibTeX `plainnat' family
  15.  %%   version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
  16.  %%
  17.  %% For use with the `natbib.sty' package; emulates the corresponding
  18.  %%   member of the `plain' family, but with author-year citations.
  19.  %%
  20.  %% With version 6.0 of `natbib.sty', it may also be used for numerical
  21.  %%   citations, while retaining the commands \citeauthor, \citefullauthor,
  22.  %%   and \citeyear to print the corresponding information.
  23.  %%
  24. ENTRY
  25.   { address
  26.     author
  27.     booktitle
  28.     chapter
  29.     edition
  30.     editor
  31.     howpublished
  32.     institution
  33.     journal
  34.     key
  35.     month
  36.     note
  37.     number
  38.     organization
  39.     pages
  40.     publisher
  41.     school
  42.     series
  43.     title
  44.     type
  45.     volume
  46.     year
  47.   }
  48.   {}
  49.   { label extra.label sort.label short.list }
  50.  
  51. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  52.  
  53. FUNCTION {init.state.consts}
  54. { #0 'before.all :=
  55.   #1 'mid.sentence :=
  56.   #2 'after.sentence :=
  57.   #3 'after.block :=
  58. }
  59.  
  60. STRINGS { s t }
  61.  
  62. FUNCTION {output.nonnull}
  63. { 's :=
  64.   output.state mid.sentence =
  65.     { ", " * write$ }
  66.     { output.state after.block =
  67.         { add.period$ write$
  68.           newline$
  69.           "\newblock " write$
  70.         }
  71.         { output.state before.all =
  72.             'write$
  73.             { add.period$ " " * write$ }
  74.           if$
  75.         }
  76.       if$
  77.       mid.sentence 'output.state :=
  78.     }
  79.   if$
  80.   s
  81. }
  82.  
  83. FUNCTION {output}
  84. { duplicate$ empty$
  85.     'pop$
  86.     'output.nonnull
  87.   if$
  88. }
  89.  
  90. FUNCTION {output.check}
  91. { 't :=
  92.   duplicate$ empty$
  93.     { pop$ "empty " t * " in " * cite$ * warning$ }
  94.     'output.nonnull
  95.   if$
  96. }
  97.  
  98. FUNCTION {fin.entry}
  99. { add.period$
  100.   write$
  101.   newline$
  102. }
  103.  
  104. FUNCTION {new.block}
  105. { output.state before.all =
  106.     'skip$
  107.     { after.block 'output.state := }
  108.   if$
  109. }
  110.  
  111. FUNCTION {new.sentence}
  112. { output.state after.block =
  113.     'skip$
  114.     { output.state before.all =
  115.         'skip$
  116.         { after.sentence 'output.state := }
  117.       if$
  118.     }
  119.   if$
  120. }
  121.  
  122. FUNCTION {not}
  123. {   { #0 }
  124.     { #1 }
  125.   if$
  126. }
  127.  
  128. FUNCTION {and}
  129. {   'skip$
  130.     { pop$ #0 }
  131.   if$
  132. }
  133.  
  134. FUNCTION {or}
  135. {   { pop$ #1 }
  136.     'skip$
  137.   if$
  138. }
  139.  
  140. FUNCTION {new.block.checka}
  141. { empty$
  142.     'skip$
  143.     'new.block
  144.   if$
  145. }
  146.  
  147. FUNCTION {new.block.checkb}
  148. { empty$
  149.   swap$ empty$
  150.   and
  151.     'skip$
  152.     'new.block
  153.   if$
  154. }
  155.  
  156. FUNCTION {new.sentence.checka}
  157. { empty$
  158.     'skip$
  159.     'new.sentence
  160.   if$
  161. }
  162.  
  163. FUNCTION {new.sentence.checkb}
  164. { empty$
  165.   swap$ empty$
  166.   and
  167.     'skip$
  168.     'new.sentence
  169.   if$
  170. }
  171.  
  172. FUNCTION {field.or.null}
  173. { duplicate$ empty$
  174.     { pop$ "" }
  175.     'skip$
  176.   if$
  177. }
  178.  
  179. FUNCTION {emphasize}
  180. { duplicate$ empty$
  181.     { pop$ "" }
  182.     { "{\em " swap$ * "}" * }
  183.   if$
  184. }
  185.  
  186. INTEGERS { nameptr namesleft numnames }
  187.  
  188. FUNCTION {format.names}
  189. { 's :=
  190.   #1 'nameptr :=
  191.   s num.names$ 'numnames :=
  192.   numnames 'namesleft :=
  193.     { namesleft #0 > }
  194.     { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
  195.       nameptr #1 >
  196.         { namesleft #1 >
  197.             { ", " * t * }
  198.             { numnames #2 >
  199.                 { "," * }
  200.                 'skip$
  201.               if$
  202.               t "others" =
  203.                 { " et~al." * }
  204.                 { " and " * t * }
  205.               if$
  206.             }
  207.           if$
  208.         }
  209.         't
  210.       if$
  211.       nameptr #1 + 'nameptr :=
  212.       namesleft #1 - 'namesleft :=
  213.     }
  214.   while$
  215. }
  216.  
  217. FUNCTION {format.authors}
  218. { author empty$
  219.     { "" }
  220.     { author format.names }
  221.   if$
  222. }
  223.  
  224. FUNCTION {format.editors}
  225. { editor empty$
  226.     { "" }
  227.     { editor format.names
  228.       editor num.names$ #1 >
  229.         { ", editors" * }
  230.         { ", editor" * }
  231.       if$
  232.     }
  233.   if$
  234. }
  235.  
  236. FUNCTION {format.title}
  237. { title empty$
  238.     { "" }
  239.     { title "t" change.case$ }
  240.   if$
  241. }
  242.  
  243. FUNCTION {format.full.names}
  244. {'s :=
  245.   #1 'nameptr :=
  246.   s num.names$ 'numnames :=
  247.   numnames 'namesleft :=
  248.     { namesleft #0 > }
  249.     { s nameptr
  250.       "{vv~}{ll}" format.name$ 't :=
  251.       nameptr #1 >
  252.         {
  253.           namesleft #1 >
  254.             { ", " * t * }
  255.             {
  256.               numnames #2 >
  257.                 { "," * }
  258.                 'skip$
  259.               if$
  260.               t "others" =
  261.                 { " et~al." * }
  262.                 { " and " * t * }
  263.               if$
  264.             }
  265.           if$
  266.         }
  267.         't
  268.       if$
  269.       nameptr #1 + 'nameptr :=
  270.       namesleft #1 - 'namesleft :=
  271.     }
  272.   while$
  273. }
  274.  
  275. FUNCTION {author.editor.key.full}
  276. { author empty$
  277.     { editor empty$
  278.         { key empty$
  279.             { cite$ #1 #3 substring$ }
  280.             'key
  281.           if$
  282.         }
  283.         { editor format.full.names }
  284.       if$
  285.     }
  286.     { author format.full.names }
  287.   if$
  288. }
  289.  
  290. FUNCTION {author.key.full}
  291. { author empty$
  292.     { key empty$
  293.          { cite$ #1 #3 substring$ }
  294.           'key
  295.       if$
  296.     }
  297.     { author format.full.names }
  298.   if$
  299. }
  300.  
  301. FUNCTION {editor.key.full}
  302. { editor empty$
  303.     { key empty$
  304.          { cite$ #1 #3 substring$ }
  305.           'key
  306.       if$
  307.     }
  308.     { editor format.full.names }
  309.   if$
  310. }
  311.  
  312. FUNCTION {make.full.names}
  313. { type$ "book" =
  314.   type$ "inbook" =
  315.   or
  316.     'author.editor.key.full
  317.     { type$ "proceedings" =
  318.         'editor.key.full
  319.         'author.key.full
  320.       if$
  321.     }
  322.   if$
  323. }
  324.  
  325. FUNCTION {output.bibitem}
  326. { newline$
  327.   "\bibitem[" write$
  328.   label write$
  329.   ")" make.full.names duplicate$ short.list =
  330.      { pop$ }
  331.      { * }
  332.    if$
  333.   "]{" * write$
  334.   cite$ write$
  335.   "}" write$
  336.   newline$
  337.   ""
  338.   before.all 'output.state :=
  339. }
  340.  
  341. FUNCTION {n.dashify}
  342. { 't :=
  343.   ""
  344.     { t empty$ not }
  345.     { t #1 #1 substring$ "-" =
  346.         { t #1 #2 substring$ "--" = not
  347.             { "--" *
  348.               t #2 global.max$ substring$ 't :=
  349.             }
  350.             {   { t #1 #1 substring$ "-" = }
  351.                 { "-" *
  352.                   t #2 global.max$ substring$ 't :=
  353.                 }
  354.               while$
  355.             }
  356.           if$
  357.         }
  358.         { t #1 #1 substring$ *
  359.           t #2 global.max$ substring$ 't :=
  360.         }
  361.       if$
  362.     }
  363.   while$
  364. }
  365.  
  366. FUNCTION {format.date}
  367. { year duplicate$ empty$
  368.     { "empty year in " cite$ * "; set to ????" * warning$
  369.        pop$ "????" }
  370.     'skip$
  371.   if$
  372.   extra.label *
  373. }
  374.  
  375. FUNCTION {format.btitle}
  376. { title emphasize
  377. }
  378.  
  379. FUNCTION {tie.or.space.connect}
  380. { duplicate$ text.length$ #3 <
  381.     { "~" }
  382.     { " " }
  383.   if$
  384.   swap$ * *
  385. }
  386.  
  387. FUNCTION {either.or.check}
  388. { empty$
  389.     'pop$
  390.     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  391.   if$
  392. }
  393.  
  394. FUNCTION {format.bvolume}
  395. { volume empty$
  396.     { "" }
  397.     { "volume" volume tie.or.space.connect
  398.       series empty$
  399.         'skip$
  400.         { " of " * series emphasize * }
  401.       if$
  402.       "volume and number" number either.or.check
  403.     }
  404.   if$
  405. }
  406.  
  407. FUNCTION {format.number.series}
  408. { volume empty$
  409.     { number empty$
  410.         { series field.or.null }
  411.         { output.state mid.sentence =
  412.             { "number" }
  413.             { "Number" }
  414.           if$
  415.           number tie.or.space.connect
  416.           series empty$
  417.             { "there's a number but no series in " cite$ * warning$ }
  418.             { " in " * series * }
  419.           if$
  420.         }
  421.       if$
  422.     }
  423.     { "" }
  424.   if$
  425. }
  426.  
  427. FUNCTION {format.edition}
  428. { edition empty$
  429.     { "" }
  430.     { output.state mid.sentence =
  431.         { edition "l" change.case$ " edition" * }
  432.         { edition "t" change.case$ " edition" * }
  433.       if$
  434.     }
  435.   if$
  436. }
  437.  
  438. INTEGERS { multiresult }
  439.  
  440. FUNCTION {multi.page.check}
  441. { 't :=
  442.   #0 'multiresult :=
  443.     { multiresult not
  444.       t empty$ not
  445.       and
  446.     }
  447.     { t #1 #1 substring$
  448.       duplicate$ "-" =
  449.       swap$ duplicate$ "," =
  450.       swap$ "+" =
  451.       or or
  452.         { #1 'multiresult := }
  453.         { t #2 global.max$ substring$ 't := }
  454.       if$
  455.     }
  456.   while$
  457.   multiresult
  458. }
  459.  
  460. FUNCTION {format.pages}
  461. { pages empty$
  462.     { "" }
  463.     { pages multi.page.check
  464.         { "pages" pages n.dashify tie.or.space.connect }
  465.         { "page" pages tie.or.space.connect }
  466.       if$
  467.     }
  468.   if$
  469. }
  470.  
  471. FUNCTION {format.vol.num.pages}
  472. { volume field.or.null
  473.   number empty$
  474.     'skip$
  475.     { "\penalty0 (" number * ")" * *
  476.       volume empty$
  477.         { "there's a number but no volume in " cite$ * warning$ }
  478.         'skip$
  479.       if$
  480.     }
  481.   if$
  482.   pages empty$
  483.     'skip$
  484.     { duplicate$ empty$
  485.         { pop$ format.pages }
  486.         { ":\penalty0 " * pages n.dashify * }
  487.       if$
  488.     }
  489.   if$
  490. }
  491.  
  492. FUNCTION {format.chapter.pages}
  493. { chapter empty$
  494.     'format.pages
  495.     { type empty$
  496.         { "chapter" }
  497.         { type "l" change.case$ }
  498.       if$
  499.       chapter tie.or.space.connect
  500.       pages empty$
  501.         'skip$
  502.         { ", " * format.pages * }
  503.       if$
  504.     }
  505.   if$
  506. }
  507.  
  508. FUNCTION {format.in.ed.booktitle}
  509. { booktitle empty$
  510.     { "" }
  511.     { editor empty$
  512.         { "In " booktitle emphasize * }
  513.         { "In " format.editors * ", " * booktitle emphasize * }
  514.       if$
  515.     }
  516.   if$
  517. }
  518.  
  519. FUNCTION {empty.misc.check}
  520. { author empty$ title empty$ howpublished empty$
  521.   month empty$ year empty$ note empty$
  522.   and and and and and
  523.   key empty$ not and
  524.     { "all relevant fields are empty in " cite$ * warning$ }
  525.     'skip$
  526.   if$
  527. }
  528.  
  529. FUNCTION {format.thesis.type}
  530. { type empty$
  531.     'skip$
  532.     { pop$
  533.       type "t" change.case$
  534.     }
  535.   if$
  536. }
  537.  
  538. FUNCTION {format.tr.number}
  539. { type empty$
  540.     { "Technical Report" }
  541.     'type
  542.   if$
  543.   number empty$
  544.     { "t" change.case$ }
  545.     { number tie.or.space.connect }
  546.   if$
  547. }
  548.  
  549. FUNCTION {format.article.crossref}
  550. { key empty$
  551.     { journal empty$
  552.         { "need key or journal for " cite$ * " to crossref " * crossref *
  553.           warning$
  554.           ""
  555.         }
  556.         { "In {\em " journal * "\/}" * }
  557.       if$
  558.     }
  559.     { "In " key * }
  560.   if$
  561.   " \cite{" * crossref * "}" *
  562. }
  563.  
  564. FUNCTION {format.crossref.editor}
  565. { editor #1 "{vv~}{ll}" format.name$
  566.   editor num.names$ duplicate$
  567.   #2 >
  568.     { pop$ " et~al." * }
  569.     { #2 <
  570.         'skip$
  571.         { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  572.             { " et~al." * }
  573.             { " and " * editor #2 "{vv~}{ll}" format.name$ * }
  574.           if$
  575.         }
  576.       if$
  577.     }
  578.   if$
  579. }
  580.  
  581. FUNCTION {format.book.crossref}
  582. { volume empty$
  583.     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  584.       "In "
  585.     }
  586.     { "Volume" volume tie.or.space.connect
  587.       " of " *
  588.     }
  589.   if$
  590.   editor empty$
  591.   editor field.or.null author field.or.null =
  592.   or
  593.     { key empty$
  594.         { series empty$
  595.             { "need editor, key, or series for " cite$ * " to crossref " *
  596.               crossref * warning$
  597.               "" *
  598.             }
  599.             { "{\em " * series * "\/}" * }
  600.           if$
  601.         }
  602.         { key * }
  603.       if$
  604.     }
  605.     { format.crossref.editor * }
  606.   if$
  607.   " \cite{" * crossref * "}" *
  608. }
  609.  
  610. FUNCTION {format.incoll.inproc.crossref}
  611. { editor empty$
  612.   editor field.or.null author field.or.null =
  613.   or
  614.     { key empty$
  615.         { booktitle empty$
  616.             { "need editor, key, or booktitle for " cite$ * " to crossref " *
  617.               crossref * warning$
  618.               ""
  619.             }
  620.             { "In {\em " booktitle * "\/}" * }
  621.           if$
  622.         }
  623.         { "In " key * }
  624.       if$
  625.     }
  626.     { "In " format.crossref.editor * }
  627.   if$
  628.   " \cite{" * crossref * "}" *
  629. }
  630.  
  631. FUNCTION {article}
  632. { output.bibitem
  633.   format.authors "author" output.check
  634.   new.block
  635.   format.title "title" output.check
  636.   new.block
  637.   crossref missing$
  638.     { journal emphasize "journal" output.check
  639.       format.vol.num.pages output
  640.       format.date "year" output.check
  641.     }
  642.     { format.article.crossref output.nonnull
  643.       format.pages output
  644.     }
  645.   if$
  646.   new.block
  647.   note output
  648.   fin.entry
  649. }
  650.  
  651. FUNCTION {book}
  652. { output.bibitem
  653.   author empty$
  654.     { format.editors "author and editor" output.check }
  655.     { format.authors output.nonnull
  656.       crossref missing$
  657.         { "author and editor" editor either.or.check }
  658.         'skip$
  659.       if$
  660.     }
  661.   if$
  662.   new.block
  663.   format.btitle "title" output.check
  664.   crossref missing$
  665.     { format.bvolume output
  666.       new.block
  667.       format.number.series output
  668.       new.sentence
  669.       publisher "publisher" output.check
  670.       address output
  671.     }
  672.     { new.block
  673.       format.book.crossref output.nonnull
  674.     }
  675.   if$
  676.   format.edition output
  677.   format.date "year" output.check
  678.   new.block
  679.   note output
  680.   fin.entry
  681. }
  682.  
  683. FUNCTION {booklet}
  684. { output.bibitem
  685.   format.authors output
  686.   new.block
  687.   format.title "title" output.check
  688.   howpublished address new.block.checkb
  689.   howpublished output
  690.   address output
  691.   format.date output
  692.   new.block
  693.   note output
  694.   fin.entry
  695. }
  696.  
  697. FUNCTION {inbook}
  698. { output.bibitem
  699.   author empty$
  700.     { format.editors "author and editor" output.check }
  701.     { format.authors output.nonnull
  702.       crossref missing$
  703.         { "author and editor" editor either.or.check }
  704.         'skip$
  705.       if$
  706.     }
  707.   if$
  708.   new.block
  709.   format.btitle "title" output.check
  710.   crossref missing$
  711.     { format.bvolume output
  712.       format.chapter.pages "chapter and pages" output.check
  713.       new.block
  714.       format.number.series output
  715.       new.sentence
  716.       publisher "publisher" output.check
  717.       address output
  718.     }
  719.     { format.chapter.pages "chapter and pages" output.check
  720.       new.block
  721.       format.book.crossref output.nonnull
  722.     }
  723.   if$
  724.   format.edition output
  725.   format.date "year" output.check
  726.   new.block
  727.   note output
  728.   fin.entry
  729. }
  730.  
  731. FUNCTION {incollection}
  732. { output.bibitem
  733.   format.authors "author" output.check
  734.   new.block
  735.   format.title "title" output.check
  736.   new.block
  737.   crossref missing$
  738.     { format.in.ed.booktitle "booktitle" output.check
  739.       format.bvolume output
  740.       format.number.series output
  741.       format.chapter.pages output
  742.       new.sentence
  743.       publisher "publisher" output.check
  744.       address output
  745.       format.edition output
  746.       format.date "year" output.check
  747.     }
  748.     { format.incoll.inproc.crossref output.nonnull
  749.       format.chapter.pages output
  750.     }
  751.   if$
  752.   new.block
  753.   note output
  754.   fin.entry
  755. }
  756.  
  757. FUNCTION {inproceedings}
  758. { output.bibitem
  759.   format.authors "author" output.check
  760.   new.block
  761.   format.title "title" output.check
  762.   new.block
  763.   crossref missing$
  764.     { format.in.ed.booktitle "booktitle" output.check
  765.       format.bvolume output
  766.       format.number.series output
  767.       format.pages output
  768.       address empty$
  769.         { organization publisher new.sentence.checkb
  770.           organization output
  771.           publisher output
  772.           format.date "year" output.check
  773.         }
  774.         { address output.nonnull
  775.           format.date "year" output.check
  776.           new.sentence
  777.           organization output
  778.           publisher output
  779.         }
  780.       if$
  781.     }
  782.     { format.incoll.inproc.crossref output.nonnull
  783.       format.pages output
  784.     }
  785.   if$
  786.   new.block
  787.   note output
  788.   fin.entry
  789. }
  790.  
  791. FUNCTION {conference} { inproceedings }
  792.  
  793. FUNCTION {manual}
  794. { output.bibitem
  795.   author empty$
  796.     { organization empty$
  797.         'skip$
  798.         { organization output.nonnull
  799.           address output
  800.         }
  801.       if$
  802.     }
  803.     { format.authors output.nonnull }
  804.   if$
  805.   new.block
  806.   format.btitle "title" output.check
  807.   author empty$
  808.     { organization empty$
  809.         { address new.block.checka
  810.           address output
  811.         }
  812.         'skip$
  813.       if$
  814.     }
  815.     { organization address new.block.checkb
  816.       organization output
  817.       address output
  818.     }
  819.   if$
  820.   format.edition output
  821.   format.date output
  822.   new.block
  823.   note output
  824.   fin.entry
  825. }
  826. FUNCTION {mastersthesis}
  827. { output.bibitem
  828.   format.authors "author" output.check
  829.   new.block
  830.   format.title "title" output.check
  831.   new.block
  832.   "Master's thesis" format.thesis.type output.nonnull
  833.   school "school" output.check
  834.   address output
  835.   format.date "year" output.check
  836.   new.block
  837.   note output
  838.   fin.entry
  839. }
  840.  
  841. FUNCTION {misc}
  842. { output.bibitem
  843.   format.authors output
  844.   title howpublished new.block.checkb
  845.   format.title output
  846.   howpublished new.block.checka
  847.   howpublished output
  848.   format.date output
  849.   new.block
  850.   note output
  851.   fin.entry
  852.   empty.misc.check
  853. }
  854.  
  855. FUNCTION {phdthesis}
  856. { output.bibitem
  857.   format.authors "author" output.check
  858.   new.block
  859.   format.btitle "title" output.check
  860.   new.block
  861.   "PhD thesis" format.thesis.type output.nonnull
  862.   school "school" output.check
  863.   address output
  864.   format.date "year" output.check
  865.   new.block
  866.   note output
  867.   fin.entry
  868. }
  869.  
  870. FUNCTION {proceedings}
  871. { output.bibitem
  872.   editor empty$
  873.     { organization output }
  874.     { format.editors output.nonnull }
  875.   if$
  876.   new.block
  877.   format.btitle "title" output.check
  878.   format.bvolume output
  879.   format.number.series output
  880.   address empty$
  881.     { editor empty$
  882.         { publisher new.sentence.checka }
  883.         { organization publisher new.sentence.checkb
  884.           organization output
  885.         }
  886.       if$
  887.       publisher output
  888.       format.date "year" output.check
  889.     }
  890.     { address output.nonnull
  891.       format.date "year" output.check
  892.       new.sentence
  893.       editor empty$
  894.         'skip$
  895.         { organization output }
  896.       if$
  897.       publisher output
  898.     }
  899.   if$
  900.   new.block
  901.   note output
  902.   fin.entry
  903. }
  904.  
  905. FUNCTION {techreport}
  906. { output.bibitem
  907.   format.authors "author" output.check
  908.   new.block
  909.   format.title "title" output.check
  910.   new.block
  911.   format.tr.number output.nonnull
  912.   institution "institution" output.check
  913.   address output
  914.   format.date "year" output.check
  915.   new.block
  916.   note output
  917.   fin.entry
  918. }
  919.  
  920. FUNCTION {unpublished}
  921. { output.bibitem
  922.   format.authors "author" output.check
  923.   new.block
  924.   format.title "title" output.check
  925.   new.block
  926.   note "note" output.check
  927.   format.date output
  928.   fin.entry
  929. }
  930.  
  931. FUNCTION {default.type} { misc }
  932.  
  933.  
  934. MACRO {jan} {"January"}
  935.  
  936. MACRO {feb} {"February"}
  937.  
  938. MACRO {mar} {"March"}
  939.  
  940. MACRO {apr} {"April"}
  941.  
  942. MACRO {may} {"May"}
  943.  
  944. MACRO {jun} {"June"}
  945.  
  946. MACRO {jul} {"July"}
  947.  
  948. MACRO {aug} {"August"}
  949.  
  950. MACRO {sep} {"September"}
  951.  
  952. MACRO {oct} {"October"}
  953.  
  954. MACRO {nov} {"November"}
  955.  
  956. MACRO {dec} {"December"}
  957.  
  958.  
  959.  
  960. MACRO {acmcs} {"ACM Computing Surveys"}
  961.  
  962. MACRO {acta} {"Acta Informatica"}
  963.  
  964. MACRO {cacm} {"Communications of the ACM"}
  965.  
  966. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  967.  
  968. MACRO {ibmsj} {"IBM Systems Journal"}
  969.  
  970. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  971.  
  972. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  973.  
  974. MACRO {ieeetcad}
  975.  {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  976.  
  977. MACRO {ipl} {"Information Processing Letters"}
  978.  
  979. MACRO {jacm} {"Journal of the ACM"}
  980.  
  981. MACRO {jcss} {"Journal of Computer and System Sciences"}
  982.  
  983. MACRO {scp} {"Science of Computer Programming"}
  984.  
  985. MACRO {sicomp} {"SIAM Journal on Computing"}
  986.  
  987. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  988.  
  989. MACRO {tods} {"ACM Transactions on Database Systems"}
  990.  
  991. MACRO {tog} {"ACM Transactions on Graphics"}
  992.  
  993. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  994.  
  995. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  996.  
  997. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  998.  
  999. MACRO {tcs} {"Theoretical Computer Science"}
  1000.  
  1001.  
  1002. READ
  1003.  
  1004. FUNCTION {sortify}
  1005. { purify$
  1006.   "l" change.case$
  1007. }
  1008.  
  1009. INTEGERS { len }
  1010.  
  1011. FUNCTION {chop.word}
  1012. { 's :=
  1013.   'len :=
  1014.   s #1 len substring$ =
  1015.     { s len #1 + global.max$ substring$ }
  1016.     's
  1017.   if$
  1018. }
  1019.  
  1020. FUNCTION {format.lab.names}
  1021. { 's :=
  1022.   s #1 "{vv~}{ll}" format.name$
  1023.   s num.names$ duplicate$
  1024.   #2 >
  1025.     { pop$ " et~al." * }
  1026.     { #2 <
  1027.         'skip$
  1028.         { s #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  1029.             { " et~al." * }
  1030.             { " and " * s #2 "{vv~}{ll}" format.name$ * }
  1031.           if$
  1032.         }
  1033.       if$
  1034.     }
  1035.   if$
  1036. }
  1037.  
  1038. FUNCTION {author.key.label}
  1039. { author empty$
  1040.     { key empty$
  1041.         { cite$ #1 #3 substring$ }
  1042.         { key #3 text.prefix$ }
  1043.       if$
  1044.     }
  1045.     { author format.lab.names }
  1046.   if$
  1047. }
  1048.  
  1049. FUNCTION {author.editor.key.label}
  1050. { author empty$
  1051.     { editor empty$
  1052.         { key empty$
  1053.             { cite$ #1 #3 substring$ }
  1054.             { key #3 text.prefix$ }
  1055.           if$
  1056.         }
  1057.         { editor format.lab.names }
  1058.       if$
  1059.     }
  1060.     { author format.lab.names }
  1061.   if$
  1062. }
  1063.  
  1064. FUNCTION {author.key.organization.label}
  1065. { author empty$
  1066.     { key empty$
  1067.         { organization empty$
  1068.             { cite$ #1 #3 substring$ }
  1069.             { "The " #4 organization chop.word #3 text.prefix$ }
  1070.           if$
  1071.         }
  1072.         { key #3 text.prefix$ }
  1073.       if$
  1074.     }
  1075.     { author format.lab.names }
  1076.   if$
  1077. }
  1078.  
  1079. FUNCTION {editor.key.organization.label}
  1080. { editor empty$
  1081.     { key empty$
  1082.         { organization empty$
  1083.             { cite$ #1 #3 substring$ }
  1084.             { "The " #4 organization chop.word #3 text.prefix$ }
  1085.           if$
  1086.         }
  1087.         { key #3 text.prefix$ }
  1088.       if$
  1089.     }
  1090.     { editor format.lab.names }
  1091.   if$
  1092. }
  1093.  
  1094. FUNCTION {calc.short.authors}
  1095. { type$ "book" =
  1096.   type$ "inbook" =
  1097.   or
  1098.     'author.editor.key.label
  1099.     { type$ "proceedings" =
  1100.         'editor.key.organization.label
  1101.         { type$ "manual" =
  1102.             'author.key.organization.label
  1103.             'author.key.label
  1104.           if$
  1105.         }
  1106.       if$
  1107.     }
  1108.   if$
  1109.   'short.list :=
  1110. }
  1111.  
  1112. FUNCTION {calc.label}
  1113. { calc.short.authors
  1114.   short.list
  1115.   "("
  1116.   *
  1117.   year duplicate$ empty$
  1118.      { pop$ "????" }
  1119.      'skip$
  1120.   if$
  1121.   *
  1122.   'label :=
  1123. }
  1124.  
  1125. FUNCTION {sort.format.names}
  1126. { 's :=
  1127.   #1 'nameptr :=
  1128.   ""
  1129.   s num.names$ 'numnames :=
  1130.   numnames 'namesleft :=
  1131.     { namesleft #0 > }
  1132.     { nameptr #1 >
  1133.         { "   " * }
  1134.         'skip$
  1135.       if$
  1136.       s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=
  1137.       nameptr numnames = t "others" = and
  1138.         { "et al" * }
  1139.         { t sortify * }
  1140.       if$
  1141.       nameptr #1 + 'nameptr :=
  1142.       namesleft #1 - 'namesleft :=
  1143.     }
  1144.   while$
  1145. }
  1146.  
  1147. FUNCTION {sort.format.title}
  1148. { 't :=
  1149.   "A " #2
  1150.     "An " #3
  1151.       "The " #4 t chop.word
  1152.     chop.word
  1153.   chop.word
  1154.   sortify
  1155.   #1 global.max$ substring$
  1156. }
  1157.  
  1158. FUNCTION {author.sort}
  1159. { author empty$
  1160.     { key empty$
  1161.         { "to sort, need author or key in " cite$ * warning$
  1162.           ""
  1163.         }
  1164.         { key sortify }
  1165.       if$
  1166.     }
  1167.     { author sort.format.names }
  1168.   if$
  1169. }
  1170.  
  1171. FUNCTION {author.editor.sort}
  1172. { author empty$
  1173.     { editor empty$
  1174.         { key empty$
  1175.             { "to sort, need author, editor, or key in " cite$ * warning$
  1176.               ""
  1177.             }
  1178.             { key sortify }
  1179.           if$
  1180.         }
  1181.         { editor sort.format.names }
  1182.       if$
  1183.     }
  1184.     { author sort.format.names }
  1185.   if$
  1186. }
  1187.  
  1188. FUNCTION {author.organization.sort}
  1189. { author empty$
  1190.     { organization empty$
  1191.         { key empty$
  1192.             { "to sort, need author, organization, or key in " cite$ * warning$
  1193.               ""
  1194.             }
  1195.             { key sortify }
  1196.           if$
  1197.         }
  1198.         { "The " #4 organization chop.word sortify }
  1199.       if$
  1200.     }
  1201.     { author sort.format.names }
  1202.   if$
  1203. }
  1204.  
  1205. FUNCTION {editor.organization.sort}
  1206. { editor empty$
  1207.     { organization empty$
  1208.         { key empty$
  1209.             { "to sort, need editor, organization, or key in " cite$ * warning$
  1210.               ""
  1211.             }
  1212.             { key sortify }
  1213.           if$
  1214.         }
  1215.         { "The " #4 organization chop.word sortify }
  1216.       if$
  1217.     }
  1218.     { editor sort.format.names }
  1219.   if$
  1220. }
  1221.  
  1222. FUNCTION {presort}
  1223. { calc.label
  1224.   type$ "book" =
  1225.   type$ "inbook" =
  1226.   or
  1227.     'author.editor.sort
  1228.     { type$ "proceedings" =
  1229.         'editor.organization.sort
  1230.         { type$ "manual" =
  1231.             'author.organization.sort
  1232.             'author.sort
  1233.           if$
  1234.         }
  1235.       if$
  1236.     }
  1237.   if$
  1238.   "    "
  1239.   *
  1240.   year field.or.null sortify
  1241.   *
  1242.   #1 entry.max$ substring$
  1243.   'sort.label :=
  1244.   sort.label
  1245.   "    "
  1246.   *
  1247.   title field.or.null
  1248.   sort.format.title
  1249.   *
  1250.   #1 entry.max$ substring$
  1251.   'sort.key$ :=
  1252. }
  1253.  
  1254. ITERATE {presort}
  1255.  
  1256. SORT
  1257.  
  1258. STRINGS { longest.label last.sort.label next.extra }
  1259.  
  1260. INTEGERS { longest.label.width last.extra.num number.label }
  1261.  
  1262. FUNCTION {initialize.longest.label}
  1263. { "" 'longest.label :=
  1264.   #0 int.to.chr$ 'last.sort.label :=
  1265.   "" 'next.extra :=
  1266.   #0 'longest.label.width :=
  1267.   #0 'last.extra.num :=
  1268.   #0 'number.label :=
  1269. }
  1270.  
  1271. FUNCTION {forward.pass}
  1272. { last.sort.label sort.label =
  1273.     { last.extra.num #1 + 'last.extra.num :=
  1274.       last.extra.num int.to.chr$ 'extra.label :=
  1275.     }
  1276.     { "a" chr.to.int$ 'last.extra.num :=
  1277.       "" 'extra.label :=
  1278.       sort.label 'last.sort.label :=
  1279.     }
  1280.   if$
  1281. }
  1282.  
  1283. FUNCTION {reverse.pass}
  1284. { next.extra "b" =
  1285.     { "a" 'extra.label := }
  1286.     'skip$
  1287.   if$
  1288.   label extra.label * 'label :=
  1289.   number.label #1 + 'number.label :=
  1290.   number.label int.to.str$ width$ longest.label.width >
  1291.     { number.label int.to.str$ 'longest.label :=
  1292.       number.label int.to.str$ width$ 'longest.label.width :=
  1293.     }
  1294.     'skip$
  1295.   if$
  1296.   extra.label 'next.extra :=
  1297. }
  1298.  
  1299. EXECUTE {initialize.longest.label}
  1300.  
  1301. ITERATE {forward.pass}
  1302.  
  1303. REVERSE {reverse.pass}
  1304.  
  1305. FUNCTION {begin.bib}
  1306. {   preamble$ empty$
  1307.     'skip$
  1308.     { preamble$ write$ newline$ }
  1309.   if$
  1310.   "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  1311. }
  1312.  
  1313. EXECUTE {begin.bib}
  1314.  
  1315. EXECUTE {init.state.consts}
  1316.  
  1317. ITERATE {call.type$}
  1318.  
  1319. FUNCTION {end.bib}
  1320. { newline$
  1321.   "\end{thebibliography}" write$ newline$
  1322. }
  1323.  
  1324. EXECUTE {end.bib}
  1325. %% End of customized bst file 
  1326.